package com.ruoyi.common.constant;

public class BankConstant {

	public static enum BANK_CHANNEL_TYPE {
		TRUE("开启"), FALSE("未开启");
		private String cnName;

		BANK_CHANNEL_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (BANK_CHANNEL_TYPE item : BANK_CHANNEL_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum PAYMENT_BIZ_TYPE {
		PAYMENT("账户消费"), 
		REFUNDMENT("账户退款"),
		DRAW("账户提现"), 
		RECHARGE("账户充值");
		private String cnName;

		PAYMENT_BIZ_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (PAYMENT_BIZ_TYPE item : PAYMENT_BIZ_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return "code:" + this.name() + ",cnName:" + this.cnName;
		}
	}

	public static enum PAYMENT_TYPE {
		ONLINE("在线交易"), OFFLINE("线下交易"),POINT("积分交易"),;

		private String cnName;

		PAYMENT_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (PAYMENT_TYPE item : PAYMENT_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return "code:" + this.name() + ",cnName:" + this.cnName;
		}
	}

	public static enum PAYMENT_SERIAL_STATUS {
		CREATE("新建交易"), CANCEL("交易取消"), SUCCESS("交易成功"), FAIL("交易失败");

		private String cnName;

		PAYMENT_SERIAL_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (PAYMENT_SERIAL_STATUS item : PAYMENT_SERIAL_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum REFUNMENT_SERIAL_STATUS {
		CREATE("新建退款"), CANCEL("退款取消"), SUCCESS("退款成功"), FAIL("退款失败");

		private String cnName;

		REFUNMENT_SERIAL_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (REFUNMENT_SERIAL_STATUS item : REFUNMENT_SERIAL_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return "code:" + this.name() + ",cnName:" + this.cnName;
		}
	}

	public static enum PAYMENT_GATEWAY {
		USER_POINT("积分兑换"),
		ALIPAY("支付宝"), UNIONPAY("银联"), XIANXIA("线下支付"), WEIXIN("微信支付"), CASH_ACCOUNT("现金账户"), ALIPAY_WAP("支付宝手机WAP支付"), ALIPAY_APP(
				"支付宝手机APP支付"), ALIPAY_BATCH("支付宝批量付款到支付宝帐号");
		private String cnName;

		PAYMENT_GATEWAY(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (PAYMENT_GATEWAY item : PAYMENT_GATEWAY.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}
}
